
import allure
from selenium.webdriver.common.by import By


from selenium import webdriver
from base.webkeys import WebKeys
from locator.allPages_data import *


class LoginPage(WebKeys):
    def login(self):
        with allure.step("访问浏览器"):
            self.open("https://zhfx.founderfu.com:13001/fz-bo/qn-test")
        # # 输入用户名
        # with allure.step(f"输入用户名{username}"):
        #     self.on_input(*username_loc,username)
        # # 输入密码
        # with allure.step("输入密码{}".format(password)):
        #     self.on_input(*password_loc, password)
        # with allure.step("等待"):
        #     self.wait_time(2)
        # # 点击登陆
        # with allure.step("点击登陆"):
        #     self.on_click(*login_loc)
        # 点击go back home
        with allure.step("go back home"):
            self.on_click(*go_back_home)

# 写完了代码 测试一下
if __name__ == '__main__':
    logi_page = LoginPage(webdriver.Chrome())
    # 需要调用 login 方法才会实际访问URL
    logi_page.login()

